package com.midou.administration.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.midou.administration.bo.ToTheNumberOfDays;
import com.midou.administration.entity.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper extends BaseMapper<Comment> {

    List<Comment> queryComment(@Param("page")Page page,@Param("comStar") Integer comStar,@Param("comBusinessId") Integer comBusinessId);

    /**
     * 按照商户id查询该商户的平均分
     * @param id
     * @return
     */
    int doBuidFindAVGStar(@Param("buid") int id);

    /**
     * 返回最近7天该商户的平均分
     * @param id
     * @return
     */
    List<ToTheNumberOfDays> doDayFindAvgStar(@Param("buid") int id);

}